﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    /// <summary>
    /// 入库
    /// </summary>
    public interface ITReceivingOrderDetailRepository: IBaseRepository<TReceivingOrderDetail>
    {
        /// <summary>
        /// 添加入库单管理
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddTReceivingOrderDetail(List<ShelvesSinles> sList, out string message);

        /// <summary>
        /// 删除入库单
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        bool DelTReceivingOrderDetail(int rid);

        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdTReceivingOrderDetaState(ReceivingOrderDetailDto m);

        /// <summary>
        /// 查看
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        TReceivingOrderDetail GetTReceivingOrderDetailById(int rid);
        
        /// <summary>
        /// 修改入库单
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdTReceivingOrderDetail(TReceivingOrderDetail m,out string message);

        /// <summary>
        /// 显示入库单
        /// </summary>
        /// <param name="billType"></param>
        /// <param name="status"></param>
        /// <param name="warehouseid"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TReceivingOrderDetail> GetReceivingOrderDetailList(DateTime? startTime, DateTime? endTime, string orderSn, int billType,int status,int warehouseid,int pageIndex,int pageSize,out int totalCount);
        /// <summary>
        /// 导出入库单
        /// </summary>
        /// <returns></returns>
        List<TReceivingOrderDetail> GetTReceivingOrderDetailExcel();
        /// <summary>
        /// 执行入库作业
        /// </summary>
        /// <returns></returns>
        bool ExecReceving(TReceivingOrderDetail orderDetail , out string  errMsg);

        /// <summary>
        /// 创建入库
        /// </summary>
        /// <param name="receivingBillDetailId"></param>
        /// <param name="qty"></param>
        /// <param name="errMsg"></param>
        /// <returns></returns>
        bool AddTReceivingOrderDetail(int receivingBillDetailId, decimal qty, out string errMsg);  

        //获取物料信息


    }
}
